\hypertarget{classsock_1_1net_1_1_tcp_connection_stream}{}\section{sock\+:\+:net\+:\+:Tcp\+Connection\+Stream Class Reference}
\label{classsock_1_1net_1_1_tcp_connection_stream}\index{sock\+::net\+::\+Tcp\+Connection\+Stream@{sock\+::net\+::\+Tcp\+Connection\+Stream}}


Tcp连接流  




{\ttfamily \#include $<$tcp\+\_\+connection\+\_\+stream.\+h$>$}

Inheritance diagram for sock\+:\+:net\+:\+:Tcp\+Connection\+Stream\+:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=3.000000cm]{classsock_1_1net_1_1_tcp_connection_stream}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
size\+\_\+t \hyperlink{classsock_1_1net_1_1_tcp_connection_stream_adf259993c6e23518827368d572dd9351}{capacity} (void)
\begin{DoxyCompactList}\small\item\em 获取流能存储的数据大小 \end{DoxyCompactList}\item 
size\+\_\+t \hyperlink{classsock_1_1net_1_1_tcp_connection_stream_acbb9bc6316d1720f0921c7ec28dd2fdd}{size} (void)
\begin{DoxyCompactList}\small\item\em 获取流中数据大小 \end{DoxyCompactList}\item 
size\+\_\+t \hyperlink{classsock_1_1net_1_1_tcp_connection_stream_a8fdbc2e9a98ff5060764924a01aba7b0}{space} (void)
\begin{DoxyCompactList}\small\item\em 获取流剩余存储空间 \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Protected Types}
\begin{DoxyCompactItemize}
\item 
typedef \hyperlink{classsock_1_1net_1_1_tcp_connection_stream}{Tcp\+Connection\+Stream} \hyperlink{classsock_1_1net_1_1_tcp_connection_stream_a9b20049f75630dcb8955b0ec91faacb5}{self}
\end{DoxyCompactItemize}
\subsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classsock_1_1net_1_1_tcp_connection_stream_af6dcac8d6517ee12ce82c9267249a353}{Tcp\+Connection\+Stream} (\hyperlink{classsock_1_1net_1_1_socket}{Socket} \&sock, size\+\_\+t \hyperlink{classsock_1_1net_1_1_tcp_connection_stream_acbb9bc6316d1720f0921c7ec28dd2fdd}{size})
\item 
\hyperlink{classsock_1_1net_1_1_tcp_connection_stream_a164a3a92764954da4dcf69d1db83536a}{Tcp\+Connection\+Stream} (\hyperlink{classsock_1_1net_1_1_socket}{Socket} \&sock, \hyperlink{namespacesock_1_1net_a2165d5b91136adc8c72ad25bfdbd0968}{Byte\+Buffer} buff, size\+\_\+t \hyperlink{classsock_1_1net_1_1_tcp_connection_stream_acbb9bc6316d1720f0921c7ec28dd2fdd}{size})
\item 
virtual \hyperlink{classsock_1_1net_1_1_tcp_connection_stream_a399c03537b559c9c981941051adb40c0}{$\sim$\+Tcp\+Connection\+Stream} ()
\item 
void \hyperlink{classsock_1_1net_1_1_tcp_connection_stream_ac81434c87413e33503b720296ca4c530}{reset} (void)
\begin{DoxyCompactList}\small\item\em 重置流 \end{DoxyCompactList}\item 
size\+\_\+t \hyperlink{classsock_1_1net_1_1_tcp_connection_stream_a17a557385b5af582c98bdd525a333cf6}{read} (char $\ast$buf, size\+\_\+t length)
\begin{DoxyCompactList}\small\item\em 从流中读数据 \end{DoxyCompactList}\item 
size\+\_\+t \hyperlink{classsock_1_1net_1_1_tcp_connection_stream_ae94584be5275ff8da7f220223beb965a}{write} (const char $\ast$buf, size\+\_\+t length)
\begin{DoxyCompactList}\small\item\em 向流中写数据 \end{DoxyCompactList}\item 
size\+\_\+t \hyperlink{classsock_1_1net_1_1_tcp_connection_stream_a4f00f30ffc87897772183c70b4f3abd4}{peek} (char $\ast$buf, size\+\_\+t length)
\begin{DoxyCompactList}\small\item\em 从流中读数据(不会从流中删除读取的数据) \end{DoxyCompactList}\item 
size\+\_\+t \hyperlink{classsock_1_1net_1_1_tcp_connection_stream_a28bb2de60e94afafaf5f66710a9442c6}{skip} (size\+\_\+t length)
\begin{DoxyCompactList}\small\item\em 忽略数据 \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Protected Attributes}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classsock_1_1net_1_1_socket}{Socket} \& \hyperlink{classsock_1_1net_1_1_tcp_connection_stream_a4ea4d8b723691673ea6574d0ec75535a}{sock\+\_\+}
\end{DoxyCompactItemize}
\subsection*{Friends}
\begin{DoxyCompactItemize}
\item 
class \hyperlink{classsock_1_1net_1_1_tcp_connection_stream_a43fe1eaa6c6b4d4ecbb2ba361d312b66}{Tcp\+Connection}
\end{DoxyCompactItemize}


\subsection{Detailed Description}
Tcp连接流 

\subsection{Member Typedef Documentation}
\hypertarget{classsock_1_1net_1_1_tcp_connection_stream_a9b20049f75630dcb8955b0ec91faacb5}{}\index{sock\+::net\+::\+Tcp\+Connection\+Stream@{sock\+::net\+::\+Tcp\+Connection\+Stream}!self@{self}}
\index{self@{self}!sock\+::net\+::\+Tcp\+Connection\+Stream@{sock\+::net\+::\+Tcp\+Connection\+Stream}}
\subsubsection[{self}]{\setlength{\rightskip}{0pt plus 5cm}typedef {\bf Tcp\+Connection\+Stream} {\bf sock\+::net\+::\+Tcp\+Connection\+Stream\+::self}\hspace{0.3cm}{\ttfamily [protected]}}\label{classsock_1_1net_1_1_tcp_connection_stream_a9b20049f75630dcb8955b0ec91faacb5}


\subsection{Constructor \& Destructor Documentation}
\hypertarget{classsock_1_1net_1_1_tcp_connection_stream_af6dcac8d6517ee12ce82c9267249a353}{}\index{sock\+::net\+::\+Tcp\+Connection\+Stream@{sock\+::net\+::\+Tcp\+Connection\+Stream}!Tcp\+Connection\+Stream@{Tcp\+Connection\+Stream}}
\index{Tcp\+Connection\+Stream@{Tcp\+Connection\+Stream}!sock\+::net\+::\+Tcp\+Connection\+Stream@{sock\+::net\+::\+Tcp\+Connection\+Stream}}
\subsubsection[{Tcp\+Connection\+Stream(\+Socket \&sock, size\+\_\+t size)}]{\setlength{\rightskip}{0pt plus 5cm}Tcp\+Connection\+Stream\+::\+Tcp\+Connection\+Stream (
\begin{DoxyParamCaption}
\item[{{\bf Socket} \&}]{sock, }
\item[{size\+\_\+t}]{size}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [protected]}}\label{classsock_1_1net_1_1_tcp_connection_stream_af6dcac8d6517ee12ce82c9267249a353}
\hypertarget{classsock_1_1net_1_1_tcp_connection_stream_a164a3a92764954da4dcf69d1db83536a}{}\index{sock\+::net\+::\+Tcp\+Connection\+Stream@{sock\+::net\+::\+Tcp\+Connection\+Stream}!Tcp\+Connection\+Stream@{Tcp\+Connection\+Stream}}
\index{Tcp\+Connection\+Stream@{Tcp\+Connection\+Stream}!sock\+::net\+::\+Tcp\+Connection\+Stream@{sock\+::net\+::\+Tcp\+Connection\+Stream}}
\subsubsection[{Tcp\+Connection\+Stream(\+Socket \&sock, Byte\+Buffer buff, size\+\_\+t size)}]{\setlength{\rightskip}{0pt plus 5cm}Tcp\+Connection\+Stream\+::\+Tcp\+Connection\+Stream (
\begin{DoxyParamCaption}
\item[{{\bf Socket} \&}]{sock, }
\item[{{\bf Byte\+Buffer}}]{buff, }
\item[{size\+\_\+t}]{size}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [protected]}}\label{classsock_1_1net_1_1_tcp_connection_stream_a164a3a92764954da4dcf69d1db83536a}
\hypertarget{classsock_1_1net_1_1_tcp_connection_stream_a399c03537b559c9c981941051adb40c0}{}\index{sock\+::net\+::\+Tcp\+Connection\+Stream@{sock\+::net\+::\+Tcp\+Connection\+Stream}!````~Tcp\+Connection\+Stream@{$\sim$\+Tcp\+Connection\+Stream}}
\index{````~Tcp\+Connection\+Stream@{$\sim$\+Tcp\+Connection\+Stream}!sock\+::net\+::\+Tcp\+Connection\+Stream@{sock\+::net\+::\+Tcp\+Connection\+Stream}}
\subsubsection[{$\sim$\+Tcp\+Connection\+Stream()}]{\setlength{\rightskip}{0pt plus 5cm}Tcp\+Connection\+Stream\+::$\sim$\+Tcp\+Connection\+Stream (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [protected]}, {\ttfamily [virtual]}}\label{classsock_1_1net_1_1_tcp_connection_stream_a399c03537b559c9c981941051adb40c0}


\subsection{Member Function Documentation}
\hypertarget{classsock_1_1net_1_1_tcp_connection_stream_adf259993c6e23518827368d572dd9351}{}\index{sock\+::net\+::\+Tcp\+Connection\+Stream@{sock\+::net\+::\+Tcp\+Connection\+Stream}!capacity@{capacity}}
\index{capacity@{capacity}!sock\+::net\+::\+Tcp\+Connection\+Stream@{sock\+::net\+::\+Tcp\+Connection\+Stream}}
\subsubsection[{capacity(void)}]{\setlength{\rightskip}{0pt plus 5cm}size\+\_\+t sock\+::net\+::\+Tcp\+Connection\+Stream\+::capacity (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}\label{classsock_1_1net_1_1_tcp_connection_stream_adf259993c6e23518827368d572dd9351}


获取流能存储的数据大小 

\begin{DoxyReturn}{Returns}
size\+\_\+t 
\end{DoxyReturn}
\hypertarget{classsock_1_1net_1_1_tcp_connection_stream_a4f00f30ffc87897772183c70b4f3abd4}{}\index{sock\+::net\+::\+Tcp\+Connection\+Stream@{sock\+::net\+::\+Tcp\+Connection\+Stream}!peek@{peek}}
\index{peek@{peek}!sock\+::net\+::\+Tcp\+Connection\+Stream@{sock\+::net\+::\+Tcp\+Connection\+Stream}}
\subsubsection[{peek(char $\ast$buf, size\+\_\+t length)}]{\setlength{\rightskip}{0pt plus 5cm}size\+\_\+t Tcp\+Connection\+Stream\+::peek (
\begin{DoxyParamCaption}
\item[{char $\ast$}]{buf, }
\item[{size\+\_\+t}]{length}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [protected]}}\label{classsock_1_1net_1_1_tcp_connection_stream_a4f00f30ffc87897772183c70b4f3abd4}


从流中读数据(不会从流中删除读取的数据) 


\begin{DoxyParams}{Parameters}
{\em buf} & 缓存 \\
\hline
{\em length} & 要读的长度 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
读到的数据长度 
\end{DoxyReturn}
\hypertarget{classsock_1_1net_1_1_tcp_connection_stream_a17a557385b5af582c98bdd525a333cf6}{}\index{sock\+::net\+::\+Tcp\+Connection\+Stream@{sock\+::net\+::\+Tcp\+Connection\+Stream}!read@{read}}
\index{read@{read}!sock\+::net\+::\+Tcp\+Connection\+Stream@{sock\+::net\+::\+Tcp\+Connection\+Stream}}
\subsubsection[{read(char $\ast$buf, size\+\_\+t length)}]{\setlength{\rightskip}{0pt plus 5cm}size\+\_\+t Tcp\+Connection\+Stream\+::read (
\begin{DoxyParamCaption}
\item[{char $\ast$}]{buf, }
\item[{size\+\_\+t}]{length}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [protected]}}\label{classsock_1_1net_1_1_tcp_connection_stream_a17a557385b5af582c98bdd525a333cf6}


从流中读数据 


\begin{DoxyParams}{Parameters}
{\em buf} & 缓存 \\
\hline
{\em length} & 要读的长度 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
读到的数据长度 
\end{DoxyReturn}
\hypertarget{classsock_1_1net_1_1_tcp_connection_stream_ac81434c87413e33503b720296ca4c530}{}\index{sock\+::net\+::\+Tcp\+Connection\+Stream@{sock\+::net\+::\+Tcp\+Connection\+Stream}!reset@{reset}}
\index{reset@{reset}!sock\+::net\+::\+Tcp\+Connection\+Stream@{sock\+::net\+::\+Tcp\+Connection\+Stream}}
\subsubsection[{reset(void)}]{\setlength{\rightskip}{0pt plus 5cm}void sock\+::net\+::\+Tcp\+Connection\+Stream\+::reset (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [protected]}}\label{classsock_1_1net_1_1_tcp_connection_stream_ac81434c87413e33503b720296ca4c530}


重置流 

\hypertarget{classsock_1_1net_1_1_tcp_connection_stream_acbb9bc6316d1720f0921c7ec28dd2fdd}{}\index{sock\+::net\+::\+Tcp\+Connection\+Stream@{sock\+::net\+::\+Tcp\+Connection\+Stream}!size@{size}}
\index{size@{size}!sock\+::net\+::\+Tcp\+Connection\+Stream@{sock\+::net\+::\+Tcp\+Connection\+Stream}}
\subsubsection[{size(void)}]{\setlength{\rightskip}{0pt plus 5cm}size\+\_\+t sock\+::net\+::\+Tcp\+Connection\+Stream\+::size (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}\label{classsock_1_1net_1_1_tcp_connection_stream_acbb9bc6316d1720f0921c7ec28dd2fdd}


获取流中数据大小 

\begin{DoxyReturn}{Returns}
size\+\_\+t 
\end{DoxyReturn}
\hypertarget{classsock_1_1net_1_1_tcp_connection_stream_a28bb2de60e94afafaf5f66710a9442c6}{}\index{sock\+::net\+::\+Tcp\+Connection\+Stream@{sock\+::net\+::\+Tcp\+Connection\+Stream}!skip@{skip}}
\index{skip@{skip}!sock\+::net\+::\+Tcp\+Connection\+Stream@{sock\+::net\+::\+Tcp\+Connection\+Stream}}
\subsubsection[{skip(size\+\_\+t length)}]{\setlength{\rightskip}{0pt plus 5cm}size\+\_\+t Tcp\+Connection\+Stream\+::skip (
\begin{DoxyParamCaption}
\item[{size\+\_\+t}]{length}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [protected]}}\label{classsock_1_1net_1_1_tcp_connection_stream_a28bb2de60e94afafaf5f66710a9442c6}


忽略数据 


\begin{DoxyParams}{Parameters}
{\em length} & 忽略的长度 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
忽略的数据长度 
\end{DoxyReturn}
\hypertarget{classsock_1_1net_1_1_tcp_connection_stream_a8fdbc2e9a98ff5060764924a01aba7b0}{}\index{sock\+::net\+::\+Tcp\+Connection\+Stream@{sock\+::net\+::\+Tcp\+Connection\+Stream}!space@{space}}
\index{space@{space}!sock\+::net\+::\+Tcp\+Connection\+Stream@{sock\+::net\+::\+Tcp\+Connection\+Stream}}
\subsubsection[{space(void)}]{\setlength{\rightskip}{0pt plus 5cm}size\+\_\+t sock\+::net\+::\+Tcp\+Connection\+Stream\+::space (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}\label{classsock_1_1net_1_1_tcp_connection_stream_a8fdbc2e9a98ff5060764924a01aba7b0}


获取流剩余存储空间 

\begin{DoxyReturn}{Returns}
size\+\_\+t 
\end{DoxyReturn}
\hypertarget{classsock_1_1net_1_1_tcp_connection_stream_ae94584be5275ff8da7f220223beb965a}{}\index{sock\+::net\+::\+Tcp\+Connection\+Stream@{sock\+::net\+::\+Tcp\+Connection\+Stream}!write@{write}}
\index{write@{write}!sock\+::net\+::\+Tcp\+Connection\+Stream@{sock\+::net\+::\+Tcp\+Connection\+Stream}}
\subsubsection[{write(const char $\ast$buf, size\+\_\+t length)}]{\setlength{\rightskip}{0pt plus 5cm}size\+\_\+t Tcp\+Connection\+Stream\+::write (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{buf, }
\item[{size\+\_\+t}]{length}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [protected]}}\label{classsock_1_1net_1_1_tcp_connection_stream_ae94584be5275ff8da7f220223beb965a}


向流中写数据 


\begin{DoxyParams}{Parameters}
{\em buf} & 缓存 \\
\hline
{\em length} & 要写的长度 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
写入的数据长度 
\end{DoxyReturn}


\subsection{Friends And Related Function Documentation}
\hypertarget{classsock_1_1net_1_1_tcp_connection_stream_a43fe1eaa6c6b4d4ecbb2ba361d312b66}{}\index{sock\+::net\+::\+Tcp\+Connection\+Stream@{sock\+::net\+::\+Tcp\+Connection\+Stream}!Tcp\+Connection@{Tcp\+Connection}}
\index{Tcp\+Connection@{Tcp\+Connection}!sock\+::net\+::\+Tcp\+Connection\+Stream@{sock\+::net\+::\+Tcp\+Connection\+Stream}}
\subsubsection[{Tcp\+Connection}]{\setlength{\rightskip}{0pt plus 5cm}friend class {\bf Tcp\+Connection}\hspace{0.3cm}{\ttfamily [friend]}}\label{classsock_1_1net_1_1_tcp_connection_stream_a43fe1eaa6c6b4d4ecbb2ba361d312b66}


\subsection{Member Data Documentation}
\hypertarget{classsock_1_1net_1_1_tcp_connection_stream_a4ea4d8b723691673ea6574d0ec75535a}{}\index{sock\+::net\+::\+Tcp\+Connection\+Stream@{sock\+::net\+::\+Tcp\+Connection\+Stream}!sock\+\_\+@{sock\+\_\+}}
\index{sock\+\_\+@{sock\+\_\+}!sock\+::net\+::\+Tcp\+Connection\+Stream@{sock\+::net\+::\+Tcp\+Connection\+Stream}}
\subsubsection[{sock\+\_\+}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Socket}\& sock\+::net\+::\+Tcp\+Connection\+Stream\+::sock\+\_\+\hspace{0.3cm}{\ttfamily [protected]}}\label{classsock_1_1net_1_1_tcp_connection_stream_a4ea4d8b723691673ea6574d0ec75535a}


The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
\item 
E\+:/git/sock/sock/net/\hyperlink{tcp__connection__stream_8h}{tcp\+\_\+connection\+\_\+stream.\+h}\item 
E\+:/git/sock/src/net/\hyperlink{tcp__connection__stream_8cc}{tcp\+\_\+connection\+\_\+stream.\+cc}\end{DoxyCompactItemize}
